struct FastXorshiftStar
{
	char[] s;
	size_t p = 0;
	char i = 0;

	this(char[] arr)
	{
		if (arr.length != 16)
		{
			throw new Exception("Seed should be 16 bytes long");
		}

		s = arr.dup;
	}

	char get()
	{
		char s1 = s[p = (p + 1) & 15];
		i = s[(i + s1) & 15];
		s1 ^= s1 << 5;
		i ^= i >> 3;
		return (s[p] = i ^ s1) & 255;
	}
}
